PESelectPrinter

Use PESelectPrinter to specify a printer other than the default printer as the print destination for the specified print job. You can use this function to enable the user to select a printer other than the default printer at print time. One way of doing this is to have your application call the Print Setup common dialog box.

C Syntax
BOOL CRPE_API PESelectPrinter (
        short printJob,
        const char FAR *driverName,
        const char FAR *printerName,
        const char FAR *portName,
        DEVMODEA FAR *mode );
Parameters

printJob

Specifies the print job for which you want to select a printer.

driverName

Specifies a pointer to a null-terminated string that contains the name of the printer driver for the selected printer.

printerName

Specifies a pointer to a null-terminated string that contains the printer name for the selected printer.

portName

Specifies a pointer to a null-terminated string that contains the port name for the port to which the selected printer is attached.

mode

Specifies a pointer to the DEVMODE, Windows API structure.

Returns
Remarks
VB Syntax
Declare Function PESelectPrinter Lib "crpe32.dll" ( ByVal printJob As 
Integer,
    ByVal PrinterDriver As String, ByVal PrinterName As String,
    ByVal PortName As String, DevMode As Any ) As Integer
Delphi Syntax
function PESelectPrinter(
    printJob: Word;
    driverName: PChar;
    printerName: PChar;
    portName: PChar;
    mode: PDeviceModeA
    ): Bool stdcall;


Seagate Software IMG Holdings, Inc.
http://www.seagatesoftware.com
Support services:
http://support.seagatesoftware.com